package pta.newch04.ex27;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Fan fan1 =  new Fan();
        Scanner scanner = new Scanner(System.in);
        int speed = scanner.nextInt();
        boolean on = scanner.nextBoolean();
        double radius = scanner.nextDouble();
        String color = scanner.next();
        Fan fan2 = new Fan(speed, on, radius, color);
        System.out.println("-------");
        System.out.println("Default");
        System.out.println("-------");
        System.out.println((fan1.toString()));
        System.out.println("-------");
        System.out.println("My Fan");
        System.out.println("-------");
        System.out.println(fan2.toString());
        scanner.close();
    }
}

class Fan {
    public static final int SLOW = 1;
    public static final int MEDIUM = 2;
    public static final int FAST = 3;

    public Fan(int speed, boolean on, double radius, String color) {
        this.speed = speed;
        this.on = on;
        this.radius = radius;
        this.color = color;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public boolean isOn() {
        return on;
    }

    public void setOn(boolean on) {
        this.on = on;
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
    public Fan(){
        this.speed = SLOW;
        this.on = false;
        this.radius = 5;
        this.color = "white";
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("speed ").append(speed).append("\n")
                .append("color ").append(color).append("\n")
                .append("radius ").append(radius).append("\n")
                .append("fan is ").append(on ? "on" : "off");
        return sb.toString();
    }

    private int speed;
    private boolean on;
    private double radius;
    private String color;


}